<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateCertificationCompanyApply extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('certification_company_apply', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->unsignedTinyInteger('status')->default(0)->comment('状态（0待认证，1认证成功，2认证失败）');
            $table->unsignedInteger('user_id');
            $table->string('name', 32)->comment('公司名称');
            $table->string('credit_code', 32)->comment('信用代码');
            $table->string('license_img', 255)->comment('营业执照图片');
            $table->string('message', 600)->default('')->comment('审核不通过的原因');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('certification_company_apply');
    }
}
